/**
 * Class Player stores and manages info about the players
 * 
 * @author michal
 * 
 * 
 */
public class Player {
  int       playerNumber;    // player no. to keep track of current
                              // player
  int       cash;
  String    playerName;
  int       crudeOilBarrels;
  int       gassolineBarrels;
  GameBoard playerBoard;     // stores object of class GameBOard,
                              // represents
                              // player`s quadrant
  boolean   rolled;
  int       nrOfDrillingRigs; // these keep track of assets owned by the
                              // player for taxation purposes.
  int       nrOfGasStations;
  int       nrOfRefineries;
  int       nrOfOilWells;

  /**
   * Constructor for objects of class player
   * 
   * @param playerNumber
   *          To keep order of players
   * @param cash
   *          Player`s cash
   * @param playerName
   *          Players Name
   * @param crudeOilBarrels
   *          Number of Crude Oil barrels owned by player
   * @param gassolineBarrels
   *          Number of gasoline barrels owned by player
   */
  public Player(int playerNumber, int cash, String playerName,
      int crudeOilBarrels, int gassolineBarrels) {
    this.playerNumber = playerNumber;
    this.cash = cash;
    this.playerName = playerName;
    this.crudeOilBarrels = crudeOilBarrels;
    this.gassolineBarrels = gassolineBarrels;
    this.rolled = false;
    this.playerBoard = new GameBoard();
    this.nrOfDrillingRigs = 0;
    this.nrOfGasStations = 0;
    this.nrOfRefineries = 0;
    this.nrOfOilWells = 0;

  }

  /**
   * @author michal
   * @return the playerNumber
   */
  public int getPlayerNumber() {
    return playerNumber;
  }

  /**
   * @param playerNumber
   *          the playerNumber to set
   */
  public void setPlayerNumber(int playerNumber) {
    this.playerNumber = playerNumber;
  }

  /**
   * @return the cash
   */
  public int getCash() {
    return cash;
  }

  /**
   * @param cash
   *          the cash to set
   */
  public void setCash(int cash) {
    this.cash = cash;
  }

  /**
   * @return the playerName
   */
  public String getPlayerName() {
    return playerName;
  }

  /**
   * @param playerName
   *          the playerName to set
   */
  public void setPlayerName(String playerName) {
    this.playerName = playerName;
  }

  /**
   * @return the crudeOilBarrels
   */
  public int getCrudeOilBarrels() {
    return crudeOilBarrels;
  }

  /**
   * @param crudeOilBarrels
   *          the crudeOilBarrels to set
   */
  public void setCrudeOilBarrels(int crudeOilBarrels) {
    this.crudeOilBarrels = crudeOilBarrels;
  }

  /**
   * @return the gassolineBarrels
   */
  public int getGassolineBarrels() {
    return gassolineBarrels;
  }

  /**
   * @param gassolineBarrels
   *          the gassolineBarrels to set
   */
  public void setGassolineBarrels(int gassolineBarrels) {
    this.gassolineBarrels = gassolineBarrels;
  }

  /**
   * @return the playerBoard
   */
  public GameBoard getPlayerBoard() {
    return playerBoard;
  }

  /**
   * @param playerBoard
   *          the playerBoard to set
   */
  public void setPlayerBoard(GameBoard playerBoard) {
    this.playerBoard = playerBoard;
  }

  /*
   * (non-Javadoc)
   * 
   * @see java.lang.Object#toString()
   */
  // @formatter:off
  public String toString() {
    return 
        "Player Name: "       + playerName       + " \n" 
      + "Player Number: "     + playerNumber     + " \n"
      + "cash: "              + cash             + " \n"
      + "Crude Oil Barrels: " + crudeOilBarrels  + " \n"
      + "Gassoline Barrels: " + gassolineBarrels + " \n";
  }
  // @formatter:on

}
